package com.zjmzxfzhl.modules.purchase.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zjmzxfzhl.modules.purchase.controller.vo.SupplierStatVo;
import com.zjmzxfzhl.modules.purchase.entity.PurchaseSupplier;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Mapper
 *
 * @author 庄金明
 */
public interface PurchaseSupplierMapper extends BaseMapper<PurchaseSupplier> {
    /**
     * 查询列表
     *
     * @param page
     * @param entity
     * @return
     */
    List<PurchaseSupplier> list(IPage<PurchaseSupplier> page, @Param("entity") PurchaseSupplier entity);

    /**
     * 统计供应商
     *
     * @param startDate
     * @param endDate
     * @return
     */
    List<SupplierStatVo> statSupplier(@Param("startDate") String startDate,
                                      @Param("endDate") String endDate);

    /**
     * 找到同名供应商
     * @return
     */
    List<String> findSameSupplierName();
}
